Existing key-value databases running on traditional memory/storage hierarchies suffer from significant inefficiencies. For example, a traditional memory/story hierarchy includes a combination of Dynamic Random Access Memory (DRAM) and Solid State Drive (SSD) and/or Hard Disk Drive (HDD). Key-value data from an application goes through a long path before it arrives at the storage media, and each access incurs multiple disk I/Os.
In some example processes of storing key-value data in traditional memory/storage hierarchies, key-value records are first stored in a memory data structure before they are written to disk files through a “compaction” process. To improve response time, disk files are organized into multiple levels (e.g., level-0 through level-3) with different sizes, with most frequent (and recent) used records stored in level-0 initially. When the files of a level fill up, their data is moved to the next level also through the compaction process. As such, a look up of a key could involve reading multiple files across several levels. Furthermore, some data is duplicated between multiple levels and therefore wastes some of the storage space. Due to these issues, the traditional key-value storing technique suffers from high overhead, high read/write amplification, and space amplification (wasted space).